#!/bin/sh

CHECK=false
LINK=false
CLONE=false

. "$TEST_SHELL_PATH/dbops-major-version-upgrade/abstract-major-version-upgrade"

shell_unit_test() {
  ! (shell_unit_test_dbops_major_version_upgrade)
  check_dbops_result
}

mock kubectl kubectl_mock_overwrite

kubectl_mock_overwrite() {
  mokked
  case "$*" in
    ("get $CLUSTER_CRD_NAME.$CRD_GROUP -n $CLUSTER_NAMESPACE $CLUSTER_NAME --template={{ .status.postgresVersion }}")
    printf '%s' "13.8"
    ;;
    *)
    not_mokked
    ;;
  esac
}
